Skip to content

[UR][L0] Return false for UR_DEVICE_INFO_MEMORY_EXPORT_EXPORTABLE_DEVICE_MEM_EXP if no types are supported - #23613

Merged
sarnex merged 2 commits into
intel:syclfrom
sarnex:memexp
Oct 27, 2026
Merged

sarnex merged 2 commits into
intel:syclfrom
sarnex:memexp

Conversation

@sarnex

@sarnex sarnex commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Right now we always return true, on some internal graphics drivers used for CRI testing we are seeing that it is not suppported so tests using this feature fail.

Return false if no types are supported.

Leave more specific checks to be defined in future versions of the sycl_ext_oneapi_memory_export spec, which explicitly says this query is not currently supported well.

CMPLRLLVM-75929

…ICE_MEM_EXP if no types are supported

Signed-off-by: Nick Sarnie <nick.sarnie@intel.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@sarnex
sarnex marked this pull request as ready for review October 23, 2026 21:00
@sarnex
sarnex requested a review from a team as a code owner October 23, 2026 21:00
@sarnex
sarnex requested review from a team and cperkinsintel and removed request for a team October 23, 2026 21:04
@dyniols
dyniols requested a balanced review from Copilot October 26, 2026 12:44

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warning

Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.

Copilot review overview

1 open issue
What changed in this PR

Updates Level Zero adapter device info reporting so UR_DEVICE_INFO_MEMORY_EXPORT_EXPORTABLE_DEVICE_MEM_EXP returns false when the underlying driver doesn’t support exporting device allocations to any external memory handle types, preventing feature-dependent tests from failing on drivers that lack support.

Changes:

  • Replace unconditional true return with a Level Zero external memory capability query.
  • Treat ZE_RESULT_ERROR_UNSUPPORTED_FEATURE as “not supported” and otherwise propagate errors.
File Description
unified-runtime/​source/​adapters/​level_zero/​common/​device.cpp Query Level Zero external memory properties to determine if device memory export is actually supported.

Review effort: Lite

Comment thread unified-runtime/source/adapters/level_zero/common/device.cpp

@dyniols dyniols left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looks good to me.
I think we will need to update the spec in the future as follow up.
Maybe it's worth to open issue for it @0x12CC @cperkinsintel your thoughts?

Comment thread unified-runtime/source/adapters/level_zero/common/device.cpp Outdated
Signed-off-by: Nick Sarnie <nick.sarnie@intel.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The focused capability check follows existing cache patterns, with only an optional regression-coverage improvement remaining.

1 open issue
1 resolved since last review

Review effort: Balanced

Comment on lines +1557 to +1559
return ReturnValue(
Device->ZeDeviceExternalMemoryProperties->memoryAllocationExportTypes !=
0);
@sys-ce-bb

Copy link
Copy Markdown
Contributor

@intel/llvm-gatekeepers please consider merging

@sarnex
sarnex merged commit a7ff6c7 into intel:sycl Oct 27, 2026
40 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants